<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<c:set var="cp" value="<%=request.getContextPath() %>"></c:set>
<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>MY-ADMIN</title>
	<meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />

    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="css/font.css">
	<link rel="stylesheet" href="lib/layui/css/layui.css">
   <link rel="stylesheet" href="layer/skin/layer.css">
    <script src="<c:url value='js/jquery.min.js'/>"></script>
    <script src="lib/layui/layui.js" charset="utf-8"></script>
    <script src="${cp }/layer/layer.js" charset="utf-8"></script>
<style type="text/css">
.layadmin-iframe{
position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
}
</style>

</head>
<body>
   <body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
  <div class="layui-header">
    <div class="layui-logo">MY-ADMIN</div>
    <!-- 头部区域（可配合layui已有的水平导航） -->
    <ul class="layui-nav layui-layout-left">
      <li class="layui-nav-item"><a href="ck.htm"  target="open">窗口设置</a></li>
      <li class="layui-nav-item"><a href="sp.htm"  target="open">文件上传</a></li>
      <li class="layui-nav-item"><a href="wzList.htm"  target="open">文章列表</a></li>     
    </ul>
    <ul class="layui-nav layui-layout-right">
      <li class="layui-nav-item">
        <a href="javascript:;">
          <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
          游客
        </a>
        <dl class="layui-nav-child">
          <dd><a href="">基本资料</a></dd>
          <dd><a href="">安全设置</a></dd>
        </dl>
      </li>
      <li class="layui-nav-item"><a href="">退出</a></li>
    </ul>
  </div>
  
  <div class="layui-side layui-bg-black">
    <div class="layui-side-scroll">
      <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
      <ul class="layui-nav layui-nav-tree"  lay-shrink="all"  lay-filter="test">
        <li class="layui-nav-item layui-nav-itemed">
          <a class="" href="javascript:;"><i class="layui-icon layui-icon-home"></i><cite>  我的工作台</cite></a>
          <dl class="layui-nav-child">
            <dd><a href="ck.htm"  target="open">&nbsp;&nbsp;&nbsp;&nbsp;窗口设置</a></dd>
            <dd><a href="sp.htm"  target="open">&nbsp;&nbsp;&nbsp;&nbsp;文件上传</a></dd>
            <dd><a href="wzList.htm"  target="open">&nbsp;&nbsp;&nbsp;&nbsp;文章列表</a></dd>
          </dl>
        </li>
        <li class="layui-nav-item layui-nav-itemed">
          <a class="" href="javascript:;"><i class="layui-icon layui-icon-home"></i><cite>  江汉大学demo</cite></a>
          <dl class="layui-nav-child">
            <dd><a href="curriculumIndex.htm"  target="open">&nbsp;&nbsp;&nbsp;&nbsp;课程管理</a></dd>
            <dd><a href="semesterIndex.htm"  target="open">&nbsp;&nbsp;&nbsp;&nbsp;学期管理</a></dd>
            <dd><a href="teacherIndex.htm"  target="open">&nbsp;&nbsp;&nbsp;&nbsp;教师管理</a></dd>
            <dd><a href="userIndex.htm"  target="open">&nbsp;&nbsp;&nbsp;&nbsp;学生管理</a></dd>
          </dl>
        </li>             
      </ul>
    </div>
  </div>
  <div class="layui-body" >
   <iframe  frameborder="0"  src="welcome.htm" name="open"  class="layadmin-iframe"  id="main"></iframe> 
  </div>
 <div class="layui-footer"  align="center">
    <!-- 底部固定区域 -->
    Copyright©2019 我的工作台
  </div>
</div>


<script>
//JavaScript代码区域
layui.use('element', function(){
  var element = layui.element;  
});

function tijiao(){
	var name=$("#name").val();
	var sid=$("#sid").val();
	if(name==""||name==null){
		layer.msg("窗口名称不为空！")
		return false;
	};
	if(sid==""||sid==null){
		layer.msg("视频/音频id不为空！")
		return false;
	};
	
	$.ajax({
		type: 'POST',
		async:false,
		url:"${cp}/add.htm",
		data:{"sid":sid,"name":name},
		success:function (data){				
			if(data=="success"){
				 var _iframe1=window.document.getElementById('main');
		            _iframe1.contentWindow.location.reload(true);
		            layer.closeAll();
			}else{
				layer.msg("新增失败！")
			}
		}
    });
}	

function xiugai(id){
	var sid=$("#sid").val();
	if(sid==""||sid==null){
		layer.msg("视频/音频id不为空！")
		return false;
	};
	
	$.ajax({
		type: 'POST',
		async:false,
		url:"${cp}/update.htm",
		data:{"id":id,"sid":sid},
		success:function (data){				
			if(data=="success"){
				 var _iframe1=window.document.getElementById('main');
		            _iframe1.contentWindow.location.reload(true);
		            layer.closeAll();
			}else{
				layer.msg("新增失败！")
			}
		}
    });
	}	
	
function zhzs(value){

    value = value.replace(/[^\d]/g,'');
    if(''!=value){
        value = parseInt(value);
    }
    return value;
}
</script>
</body>
</html>